#include <iostream>
#include <string>
#include <vector>
#include <functional>

int Sum(int a, int b)
{
    return a + b;
}

int Sum100(int b)
{
    return 100 + b;
}

int main()
{
    using Task = std::function<int()>;
    std::vector<Task> arry;
    arry.push_back(std::bind(Sum, 1, 2));
    arry.push_back(std::bind(Sum, 3, 4));
    arry.push_back(std::bind(Sum, 5, 6));
    arry.push_back(std::bind(Sum, 7, 8));

    for (auto& f : arry)
    {
        std::cout << f() << std::endl;
    }
    return 0;
}
